package com.four.controller;

import com.four.pojo.Ser_ddd;
import com.four.service.impl.Ser_DddServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 于志豪
 * @create 2021-10-27 9:46
 */

@Controller
public class Ser_DddController {
    @Autowired
    @Qualifier("ser_DddServiceImpl")
    private Ser_DddServiceImpl service;

    @RequestMapping("/addSer")
    private String addSer(Ser_ddd ser_ddd,int id){
        service.addSer(ser_ddd);
        System.out.println(id);
        System.out.println(ser_ddd);

        return "redirect:/findThreeBJ?id="+id;
    }

    @RequestMapping("/deleteSer")
    private String deleteSer(int id,int ewq){//删除服务
        System.out.println("删除");
        System.out.println("id"+id);
        System.out.println("ewq"+ewq);
        service.deleteSer(ewq);
        return "redirect:/findThreeBJ?id="+id;
    }

}
